#include<iostream>
using std::cout;
using std::endl;
#include "String.hh"
//Base class
class Base{

public:
    Base(int x)
    :_num(x)
    {}
    ~Base(){
        cout<<"~Base"<<endl;
    }
    
    //operator ++
    Base& operator+(const Base &rhs){
        _num = _num+rhs._num;
        return *this;
    }
    void print(){
        cout<<_num<<endl;
    }
    friend
    int operator==(const Base&rhs,const int &num);

private:
    int _num;
};
//不改变操作数值的建议用友元
int operator==(const Base&rhs,const int &num){
    if(rhs._num == num){
        return 1;
    }
    else return 0;
}
void test0(){

    String s1("Hello ");
    cout<<s1<<endl;
}